import service from "./indexApi";

const deptApi = {
    //添加
    insert(dept){
        return service.post('/admin/dept',dept);
    },
    //根据did删除
    delete(did){
        return service.delete(`/admin/dept/${did}`);
    },
    //修改
    update(dept){
        return service.put('/admin/dept',dept);
    },
    //根据did查询
    selectByDid(did){
        return service.get(`/admin/dept/${did}`);
    },
    //查询所有
    selectAll(){
        return service.get('/admin/dept');
    }
};

export default deptApi;